<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<HTML>
<HEAD>
<TITLE>RestFinder - wszystko o restauracjach w twoim mieście!</TITLE>
<META HTTP-EQUIV="Content-Type"
	CONTENT="text/html; charset=windows-1250">
<!-- ImageReady Preload Script (index.psd) -->
<SCRIPT TYPE="text/javascript">
<!--
	function newImage(arg) {
		if (document.images) {
			rslt = new Image();
			rslt.src = arg;
			return rslt;
		}
	}

	function changeImages() {
		if (document.images && (preloadFlag == true)) {
			for ( var i = 0; i < changeImages.arguments.length; i += 2) {
				document[changeImages.arguments[i]].src = changeImages.arguments[i + 1];
			}
		}
	}

	var preloadFlag = false;
	function preloadImages() {
		if (document.images) {
			moje_konto = newImage("images/moje_konto.jpg");
			uzytkownicy = newImage("images/uzytkownicy.jpg");
			restauracje = newImage("images/restauracje.jpg");
			news = newImage("images/news.jpg");
			wyloguj = newImage("images/wyloguj.jpg");
			preloadFlag = true;
		}
	}
// -->
</SCRIPT>
<!-- End Preload Script -->
<link href="css/styles.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0
	MARGINHEIGHT=0 ONLOAD="preloadImages();">
	<center>

		<!-- ImageReady Slices (index.psd) -->
		<TABLE WIDTH=775 BORDER=0 CELLPADDING=0 CELLSPACING=0>
			<TR>
				<TD COLSPAN=5><IMG SRC="images/m1.jpg" WIDTH=313 HEIGHT=93
					ALT="">
				</TD>
				<TD COLSPAN=2><A HREF="adminkonto.htm"
					ONMOUSEOVER="window.status='home page'; changeImages('home_page', 'images/moje_konto-over.jpg'); return true;"
					ONMOUSEOUT="window.status=''; changeImages('home_page', 'images/moje_konto.jpg'); return true;">
						<IMG NAME="home_page" SRC="images/moje_konto.jpg" WIDTH=95
						HEIGHT=93 BORDER=0 ALT="home page"> </A>
				</TD>
				<TD COLSPAN=2><A HREF="uzytkownicy.htm"
					ONMOUSEOVER="window.status='about us'; changeImages('about_us', 'images/uzytkownicy-over.jpg'); return true;"
					ONMOUSEOUT="window.status=''; changeImages('about_us', 'images/uzytkownicy.jpg'); return true;">
						<IMG NAME="about_us" SRC="images/uzytkownicy.jpg" WIDTH=92 HEIGHT=93
						BORDER=0 ALT="about us"> </A>
				</TD>
				<TD COLSPAN=3><A HREF="restauracje.htm"
					ONMOUSEOVER="window.status='location'; changeImages('location', 'images/restauracje-over.jpg'); return true;"
					ONMOUSEOUT="window.status=''; changeImages('location', 'images/restauracje.jpg'); return true;">
						<IMG NAME="location" SRC="images/restauracje.jpg" WIDTH=83 HEIGHT=93
						BORDER=0 ALT="location"> </A>
				</TD>
				<TD COLSPAN=2><A HREF="adminnews.htm"
					ONMOUSEOVER="window.status='menu'; changeImages('menu', 'images/news-over.jpg'); return true;"
					ONMOUSEOUT="window.status=''; changeImages('menu', 'images/news.jpg'); return true;">
						<IMG NAME="menu" SRC="images/news.jpg" WIDTH=92 HEIGHT=93 BORDER=0
						ALT="menu"> </A>
				</TD>
				<TD COLSPAN=3><A HREF="adminlogout.htm"
					ONMOUSEOVER="window.status='contacts'; changeImages('contacts', 'images/wyloguj-over.jpg'); return true;"
					ONMOUSEOUT="window.status=''; changeImages('contacts', 'images/wyloguj.jpg'); return true;">
						<IMG NAME="contacts" SRC="images/wyloguj.jpg" WIDTH=92 HEIGHT=93
						BORDER=0 ALT="contacts"> </A>
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=93 ALT="">
				</TD>
			</TR>
			<TR>
				<TD COLSPAN=8 ROWSPAN=2><IMG SRC="images/m2.jpg" WIDTH=425
					HEIGHT=228 ALT="">
				</TD>
				<TD COLSPAN=9><IMG SRC="images/m3index.jpg" WIDTH=350
					HEIGHT=119 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=119 ALT="">
				</TD>
			</TR>
			<TR>
				<TD WIDTH=319 HEIGHT=109 COLSPAN=7 align="left" valign="top"
					class="text2">Zalogowany jako: <security:authentication
						property="principal.username" /> <br />
				</TD>
				<TD COLSPAN=2><IMG SRC="images/spacer.gif" WIDTH=31 HEIGHT=109
					ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=109 ALT="">
				</TD>
			</TR>




			<TD><IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=47 ALT="">
			</TD>
			</TR>
			<TR>
				<TD><IMG SRC="images/spacer.gif" WIDTH=61 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=144 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=44 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=35 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=29 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=89 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=6 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=17 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=7 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=29 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=47 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=67 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=6 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=88 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=8 HEIGHT=1 ALT="">
				</TD>
				<TD><IMG SRC="images/spacer.gif" WIDTH=23 HEIGHT=1 ALT="">
				</TD>
				<TD></TD>
			</TR>
		</TABLE>
		<div class="tabbed-area">


			<div class="box-wrap">

				<div id="box-one" style="height: 340px;  overflow: scroll;">
					
<h3 style="text-align: center">Edytuj użytkownika <c:out value="${editedUser.username }" />:</h3>
					<form:form action="adminuseredit=${editedUser.username}.htm" commandName="editedUser">
						<table>
							<tr>
								<td colspan="2">
								<td />


							</tr>
							<tr>
								<td>Imię :</td>
								<td><input type="text" name="name" value="${editedUser.name }" />
								</td>
								<td><span style="color: red"><c:out
											value="${nameError}" /> </span>
								</td>

							</tr>
							<tr>
								<td>Email :</td>
								<td><input type="text" name="email" value="${editedUser.email }" />
								</td>
								<td><span style="color: red"><c:out
											value="${emailError}" /> </span>
								</td>

							</tr>
							<tr>
								<td>Telefon:</td>
								<td><input type="text" name="telephone"
									value="${editedUser.telephone}" /></td>
								<td><span style="color: red"><c:out
											value="${telephoneError}" /> </span>
								</td>

							</tr>
							<tr>
								<td>Adres:</td>
								<td><input type="text" name="street" value="${editedUser.street}" />
								</td>
								<td><span style="color: red"><c:out
											value="${streetError}" /> </span>
								</td>

							</tr>
							<tr>
								<td>Miasto:</td>
								<td><select name="city">
										<c:forEach items="${cities}" var="value">
											<option value="${value}"
												<c:if test="${editedUser.city == value}"> selected="selected" </c:if>>${value}</option>
										</c:forEach>
								</select>
								</td>
							</tr>
							<tr>
								<td>Kraj:</td>
								<td><select name="country">
										<c:forEach items="${countries}" var="value">
											<option value="${value}"
												<c:if test="${editedUser.country == value}"> selected="selected" </c:if>>${value}</option>
										</c:forEach>
								</select>
								</td>
							</tr>
							<tr>
								<td colspan="2"><input type="submit" class="button"
									value="Zmień dane"></td>
							</tr>
						</table>
					</form:form>

				</div>	
								
			</div>

		</div>
		<br /> <br /> <br /> <br />

		<table>
			<tr>
				<TD WIDTH=775 HEIGHT=47 COLSPAN=17 align="center" valign="middle"
					BGCOLOR=#979076 class="text4"></TD>
			</tr>
		</table>
	</center>
</BODY>

</HTML>